﻿<UserControl x:Class="VKontakteClient.AudioControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Height="50" MinWidth="160" HorizontalAlignment="Stretch" DataContextChanged="UserControl_DataContextChanged">
    <Border Background="AliceBlue" BorderBrush="Black" BorderThickness="1" CornerRadius="10">
        <Grid ContextMenuService.ShowOnDisabled="True">
            <Grid.ContextMenu>
                <ContextMenu>
                    <MenuItem Header="Скачать..." Click="DownloadFile" x:Name="DownloadFileBtn" IsEnabled="False" />
                    <MenuItem Header="Скопировать ссылку" Click="CopyLink" />
                    <MenuItem Header="Текст песни..." Click="ShowLyrics" x:Name="ShowLyricsBtn"/>
                </ContextMenu>
            </Grid.ContextMenu>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="35"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="80"/>
            </Grid.ColumnDefinitions>
            <Button Content=">" x:Name="PlayBtn" Grid.Column="0" Margin="5" Click="Play" />
            <StackPanel Grid.Column="1" HorizontalAlignment="Stretch">
                <TextBox IsReadOnly="True" Background="Transparent" Margin="0,5,0,0" Text="{Binding Path=Name}" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center" BorderThickness="0" />
                <Slider ValueChanged="Slider_ValueChanged" VerticalAlignment="Center" HorizontalAlignment="Stretch" Value="{Binding Path=Progress}" Maximum="{Binding Path=MaximumProgress}" x:Name="ProgressSld" />
            </StackPanel>
            <TextBlock Text="{Binding Path=Status}" Grid.Column="2" Margin="5" HorizontalAlignment="Center" VerticalAlignment="Center" IsEnabled="False" />
        </Grid>
    </Border>
</UserControl>
